namespace et {
    export class CancelToken {
        private actions = new Action();
        public add(callBack: () => void, target?: any) {
            this.actions.Add(callBack, target);
        }
        public remove(callBack: () => void) {
            this.actions.Remove(callBack);
        }
        public Cancel(): void {
            this.actions.Invoke();
        }
    }
}